import request from "../../untils/request.js"


export const getArea = (params) => {
    return request.get("/outpatient/getArea", {params} )
}

// 获取字典数据
export const dict = (params) => {
    return request.get("/outpatient/index/dict", { params } )
}


//居民健康档案-信息列表
export const getDocphrList = (params) => {
    return request.get("/outpatient/docphr/list", { params } )
}

//往来单位
export const getContuntList = (params) => {
    return request.get("/outpatient/contunt/list", {params} )
}

//往来单位新增
export const addContractUnit = (data) => {
    return request.post("/outpatient/contunt", data)
}

//往来单位修改
export const editContractUnit = (data) => {
    return request.put("/outpatient/contunt", data)
}

//往来单位信息
export const getContractUnit = (id) => {
    return request.get(`/outpatient/contunt/${id}`)
}

//科室列表
export const getDeptList = (params) => {
    return request.get("/outpatient/findAttribute", {params} )
}

//医生列表
export const getDoctorList = (params) => {
    return request.get("/outpatient/list", {params} )
}

//指定科室医生列表
export const getDeptOfDoctor = (params) => {
    return request.get("/outpatient/selectDeptStaff", {params} )
}

//指定科室医生列表
export const getActiveList = (params) => {
    return request.get("/outpatient/dutytable/regActiveList", {params} )
}

//挂号类别
export const getRegisterType = (params) => {
    return request.get("/outpatient/registertype/list", {params} )
}

//根据坐诊查询医生主要挂号类别
export const getDoctorRegisterType = (params) => {
    return request.get("/outpatient/drgstable/get", {params} )
}

//挂号列表-保存
export const addRegisterList = (data) => {
    return request.post("/outpatient/register", data)
}

//挂号列表-修改
export const editRegisterList = (data) => {
    return request.put("/outpatient/register", data)
}

//健康档案-修改
export const editDocphr = (data) => {
    return request.put("/outpatient/docphr", data)
}

//健康档案-新增
export const addDocphr = (data) => {
    return request.post("/outpatient/docphr", data)
}


//查询有坐诊医生的科室
export const getConsultingDepartment = (data) => {
    return request.get("/outpatient/dutytable/activeDept", data)
}

//上传文件
export const uploadFile = (params) => {
    return request.get("/outpatient/upload/file", { params } )
}

export default{
uploadFile
}